#ifndef WEAPON_H
#define WEAPON_H

#include <nds.h>
#include <vector>
#include "ellen/ln.h"
#include "reference.h"
//using namespace std;

class weapon{
private:
	int w_damage;
	tFloat w_spriteSize;

	tFloat w_maxSpeedX;
	tFloat w_maxSpeedY;

	t2DVector w_position;
	t2DVector w_localPosition;
	t2DVector w_Offset;
	t2DVector w_velocity;

	int w_facingRight;
	bool playerOwned;

	BoundingBox w_boundingBox;
	
	int w_animStart;
	int w_animEnd;
	int w_boundsOffset;
	int w_boundsSize;
	
	//std::vector<lnSprite*> x_bullets;
	//std::vector<lnSprite*> x_bulletsAnim;
	lnSprite* w_sprite;
	lnSpriteAnim* w_spriteAnim;

	//void* x_sprData;
	//void* x_sprPalette;
	//int x_spriteSize;
public:
	weapon();
	weapon(const weapon& W);
	~weapon();
	void move(int direction);
	void handleAnimation();
	void display();
	void createWeaponSprite(const void * sprData,const void * sprPalette,int spriteSize,int start,int end,int boundsOffset,int BoundSize);
	void destroyWeaponSprite();
	void updateWeapon();
	void setOffset(tFloat posX,tFloat posY);
	void setPos(tFloat posX,tFloat posY);
	void setHidden(bool hidden);
	void setDamage(int damage);
	void setPlayerOwned(bool owned);
	bool getPlayerOwned();
	
	int getDamage();
	t2DVector getPos();
	t2DVector getOffset();
	BoundingBox getBounds();

	bool markedForDeletion;
};

#endif